package org.judking.CarKeeper.service;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class NetworkService {
	public static final String SERVER_BASE_URL = "http://192.168.0.3/CarKeeperServer";
	public static final ExecutorService EXECUTOR_SERVICE = Executors.newCachedThreadPool();
	public static ConnectivityManager connectivityManager = null;
	
	public static boolean isOnline() {
		NetworkInfo netInfo = connectivityManager.getActiveNetworkInfo();
		if (netInfo != null && netInfo.isConnectedOrConnecting()) {
			return true;
		}
		return false;
	}
	
}
